<template>
    <div>
        <el-form class="demo-form-inline" :model="dialogForm" label-position="right" label-width="140px" :inline="true">
            <el-form-item label="排序">
            <el-input v-model="dialogForm.rank"></el-input>
        </el-form-item>
        <el-form-item label="物料检验项目名称">
            <el-input v-model="dialogForm.name"></el-input>
        </el-form-item>
        <el-form-item label="配置类型">
                <el-select v-model="dialogForm.type" placeholder="请选择">
                <el-option
                v-for="item in processTypeConfig"
                :key="item.type"
                :label="item.name"
                :value="item.type">
                </el-option>
            </el-select>
        </el-form-item>
        <el-form-item label="检验项目参考值"><el-input v-model="dialogForm.reference" ></el-input></el-form-item>
        <el-form-item label="单位" v-if="dialogForm.type==='2'"><el-input v-model="dialogForm.unit" ></el-input></el-form-item>
        <el-form-item label="检验项目特殊说明" class="textareaWith100">
            <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="dialogForm.remark"></el-input>
        </el-form-item>
        <el-form-item label="是否启用" class="switch100"><el-switch v-model="dialogForm.isEnable" active-value="1" inactive-value="0"></el-switch></el-form-item>
            <el-form-item label="创建人">
            <el-input v-model="dialogForm.creatorName" disabled></el-input>
        </el-form-item>
        <el-form-item label="创建时间">
            <el-input v-model="dialogForm.createTime" disabled></el-input>
        </el-form-item>
    </el-form>
    <div style="text-align: center;">
        <el-button @click="submit" type="primary">确 定</el-button>
    </div>
    </div>
</template>
<script>
export default {
    props:{
        dialogForm:Object
    },
    data(){
        return {
            processTypeConfig: [
                // {
                //     type:'0',
                //     name:'指标'
                // },
                {
                    type: '1',
                    name: '检验项目状态判定'
                }, {
                    type: '2',
                    name: '指标参数判定'
                }, {
                    type: '3',
                    name: '图片上传'
                }
            ]
        }
    },
    methods:{
        submit(){
            let self = this;
            self.$emit('addUpdate',self.dialogForm);
        }
    }
}
</script>
<style scoped>

</style>

